package NC;

import java.util.HashSet;

public class NC41 {
    public int maxLength (int[] arr) {
        // write code here
        int left=0,right =0;
        HashSet<Integer> set = new HashSet<>();
        int ans = 0;
        while (right<arr.length){
            if(!set.contains(arr[right])){
                set.add(arr[right]);
                right++;
            }else {
                set.remove(arr[left]);
                left++;
            }
            ans = Math.max(ans,set.size());
        }
        return ans;
    }

    public static void main(String[] args) {
        System.out.println((double)1);
    }
}